import 'babel-polyfill'
import React from 'react'
import { render } from 'react-dom'
import { Router, IndexRoute, Route, hashHistory } from 'react-router'
import { Provider } from 'react-redux'
import configure from './store'

import App from './ui-page/App'
import Button from './ui-page/Button'
import IconFont from './ui-page/IconFont'
import Link from './ui-page/Link'
import Nav from './ui-page/Nav'
import ImgTxt from './ui-page/ImgTxt'
import Input from './ui-page/Input'
import PostFrame from './ui-page/PostFrame'
import Menu from './ui-page/Menu'
import Checkbox from './ui-page/Checkbox'
import Toast from './ui-page/Toast'
import TitleBar from './ui-page/TitleBar'
import SubNav from './ui-page/SubNav'
import NavContent from './ui-page/NavContent'
import Table from './ui-page/Table'
import Modal from './ui-page/Modal'
import DnD from './ui-page/DnD'
import Select from './ui-page/Select'
import Loading from './ui-page/Loading'
import Switch from './ui-page/Switch'
import Radio from './ui-page/Radio'
import Gallery from './ui-page/Gallery'
import Form from './ui-page/Form'
import Tree from './ui-page/Tree'
import DateSelect from './ui-page/DateSelect'
import Address from './ui-page/Address'
import InputList from './ui-page/InputList'
import FileUpload from './ui-page/FileUpload'
import Range from './ui-page/Range'
import TweetInput from './ui-page/TweetInput'
import Tip from './ui-page/Tip'
import CropImageUpload from './ui-page/CropImageUpload'
import Tabs from './ui-page/Tabs'
import TreeList from './ui-page/TreeList'

const store = configure()

render(
	<Provider store={store}>
    <Router history={hashHistory}>
      <Route path="/" component={App}>
        <Route path='iconfont' component={IconFont}/>
        <Route path='link' component={Link}/>
        <Route path='nav' component={Nav}/>
        <Route path='imgtxt' component={ImgTxt}/>
        <Route path='input' component={Input}/>
        <Route path='button' component={Button}/>
        <Route path='postframe' component={PostFrame}/>
        <Route path='menu' component={Menu}/>
        <Route path='checkbox' component={Checkbox}/>
        <Route path='toast' component={Toast}/>
        <Route path='titlebar' component={TitleBar}/>
        <Route path='subnav' component={SubNav}/>
        <Route path='navcontent' component={NavContent}/>
        <Route path='table' component={Table}/>
        <Route path='modal' component={Modal}/>
        <Route path='dnd' component={DnD}/>
        <Route path='select' component={Select}/>
        <Route path='loading' component={Loading}/>
        <Route path='switch' component={Switch}/>
        <Route path='radio' component={Radio}/>
        <Route path='gallery' component={Gallery}/>
        <Route path='form' component={Form}/>
        <Route path='dateselect' component={DateSelect}/>
        <Route path='address' component={Address}/>
        <Route path='inputlist' component={InputList}/>
        <Route path='fileupload' component={FileUpload}/>
        <Route path='range' component={Range}/>
        <Route path='tweetinput' component={TweetInput}/>
        <Route path='tip' component={Tip}/>
        <Route path='cropImageUpload' component={CropImageUpload}/>
        <Route path='tabs' component={Tabs}/>
        <Route path='treeList' component={TreeList}/>
      </Route>
    </Router>
  </Provider>,
	document.getElementById('root')
)
